Skip to content

Conversation

rcvalle
Copy link
Member

@rcvalle rcvalle commented Mar 26, 2024

Fix drop and drop_in_place by transforming self of drop and drop_in_place methods into a Drop trait objects.

This was split off from #116404.

cc @compiler-errors @workingjubilee

@rustbot
Copy link
Collaborator

rustbot commented Mar 26, 2024

r? @oli-obk

rustbot has assigned @oli-obk.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added PG-exploit-mitigations Project group: Exploit mitigations S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Mar 26, 2024
@rustbot
Copy link
Collaborator

rustbot commented Mar 26, 2024

Some changes occurred in tests/ui/sanitizer

cc @rust-lang/project-exploit-mitigations, @rcvalle

Some changes occurred in compiler/rustc_symbol_mangling/src/typeid

cc @rust-lang/project-exploit-mitigations, @rcvalle

@rcvalle
Copy link
Member Author

rcvalle commented Mar 26, 2024

r? @compiler-errors

@rustbot rustbot assigned compiler-errors and unassigned oli-obk Mar 26, 2024
@rcvalle rcvalle force-pushed the rust-cfi-fix-drop-drop-in-place branch from a676408 to 9006deb Compare March 27, 2024 02:27
@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 27, 2024
@rcvalle rcvalle force-pushed the rust-cfi-fix-drop-drop-in-place branch from 9006deb to 57dc45b Compare March 27, 2024 18:04
@compiler-errors
Copy link
Member

Also you need to add a definition of the Drop trait to tests/codegen/sanitizer/kcfi/emit-type-metadata-trait-objects.rs, which fails currently:

#[lang="drop"]
trait Drop { fn drop(&mut self); }

@compiler-errors
Copy link
Member

@rustbot author

@rcvalle
Copy link
Member Author

rcvalle commented Mar 27, 2024

Also you need to add a definition of the Drop trait to tests/codegen/sanitizer/kcfi/emit-type-metadata-trait-objects.rs, which fails currently:

#[lang="drop"]
trait Drop { fn drop(&mut self); }

Done.

Fix drop and drop_in_place by transforming self of drop and
drop_in_place methods into Drop trait objects.
@rcvalle rcvalle force-pushed the rust-cfi-fix-drop-drop-in-place branch from 57dc45b to 0b86081 Compare March 27, 2024 19:52
@rustbot
Copy link
Collaborator

rustbot commented Mar 27, 2024

Some changes occurred in tests/codegen/sanitizer

cc @rust-lang/project-exploit-mitigations, @rcvalle

@compiler-errors
Copy link
Member

@bors r+

@bors
Copy link
Collaborator

bors commented Mar 27, 2024

📌 Commit 0b86081 has been approved by compiler-errors

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Mar 27, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 28, 2024
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#121943 (Clarify atomic bit validity)
 - rust-lang#123075 (CFI: Fix drop and drop_in_place)
 - rust-lang#123101 (Delegation: fix ICE on wrong `Self` instantiation)
 - rust-lang#123130 (Load missing type of impl associated constant from trait definition)
 - rust-lang#123133 (chore: fix some comments)
 - rust-lang#123136 (Some wording improvement)
 - rust-lang#123139 (`num::NonZero::get` can be 1 transmute instead of 2)
 - rust-lang#123142 (Let nils know about changes to target docs)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 6464e5b into rust-lang:master Mar 28, 2024
@rustbot rustbot added this to the 1.79.0 milestone Mar 28, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Mar 28, 2024
Rollup merge of rust-lang#123075 - rcvalle:rust-cfi-fix-drop-drop-in-place, r=compiler-errors

CFI: Fix drop and drop_in_place

Fix drop and drop_in_place by transforming self of drop and drop_in_place methods into a Drop trait objects.

This was split off from rust-lang#116404.

cc `@compiler-errors` `@workingjubilee`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PG-exploit-mitigations Project group: Exploit mitigations S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants